#install tomcat
sudo yum -y update
sudo yum -y install tomcat6
sudo yum -y install tomcat6-webapps tomcat6-docs-webapp tomcat6-admin-webapps
sudo chkconfig --level 345 tomcat6 on

#start tomcat
sudo service tomcat6 start

#chmod before upload file using sftp
sudo chmod 777 /var/lib/tomcat6/webapps/
sudo chmod 777 /usr/share/tomcat6/conf
sudo chmod 777 /usr/share/tomcat6/conf/Catalina/localhost


#delete old conf file
sudo rm -f /usr/share/tomcat6/conf/tomcat-users.xml

#clean up old stuffs
sudo rm -rf /var/lib/tomcat6/webapps/myTube
sudo rm -rf /var/lib/tomcat6/webapps/myTube.war

